package com.borened.common.log.controller.query;

import com.baomidou.mybatisplus.core.enums.SqlKeyword;
import com.borened.common.core.base.BasePageQuery;
import com.borened.common.core.mybatisplus.MpWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 日志查询类
 *
 * @author: cch
 * @since: 2022/1/21
 */
@Data
@ApiModel("操作日志查询参数")
public class LogQuery extends BasePageQuery {
    @ApiModelProperty("系统模块")
    @MpWrapper(operateType = SqlKeyword.LIKE, column = "title")
    private String title;

    @ApiModelProperty("操作人员")
    @MpWrapper(operateType = SqlKeyword.EQ)
    private String operatorName;

    @ApiModelProperty("操作状态")
    @MpWrapper(operateType = SqlKeyword.EQ)
    private Short status;

    @ApiModelProperty("操作人类别")
    @MpWrapper(operateType = SqlKeyword.EQ)
    private Integer operatorType;

    @ApiModelProperty(value = "操作时间大于")
    @MpWrapper(operateType = SqlKeyword.GE, column = "oper_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String beginTime;

    @ApiModelProperty(value = "操作时间小于")
    @MpWrapper(operateType = SqlKeyword.LE, column = "oper_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String endTime;
}
